package com.mybatils.db1.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author Xiongx
 * @version 1.0
 * @date 2021/5/21 9:44
 * @since JDK 1.8
 *
 * 数据源连接1
 *
 */
public interface TestMapper extends BaseMapper {

    @Select("SELECT * FROM `spring-demo`.`demo_file`")
    List<Map<String, Object>> stringMapObjectList();

    @Select("select * from note")
    List<Map<String, Object>> selectNoteMapListObject();


    @Select("<script> select * from note <if test=\"title !=null \">where title like '%' #{title} '%' </if>  </script>")
    List<Map<String, Object>> selectMapObjectList(@Param("title")String title);

}
